From 6a246a6c96986e5d0d743cbab292e0d99dcdc32c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 22 Feb 2006 17:52:29 +0000 Subject: [PATCH] Minor optimizations. (#332059, Arnaud Charlet) 2006-02-22 Matthias Clasen * gtk/gtktextbtree.c: * gtk/gtktextiter.c: Minor optimizations. (#332059, Arnaud Charlet) --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ gtk/gtktextbtree.c | 12 +++--------- gtk/gtktextiter.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c5fc57ad3..cf59788b8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-02-22 Matthias Clasen + * gtk/gtktextbtree.c: + * gtk/gtktextiter.c: Minor optimizations. (#332059, Arnaud Charlet) + * gtk/gtkradiobutton.c (gtk_radio_button_clicked): Emit notify::active here, when changing the value of this property. (#331651) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6c5fc57ad3..cf59788b8d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2006-02-22 Matthias Clasen + * gtk/gtktextbtree.c: + * gtk/gtktextiter.c: Minor optimizations. (#332059, Arnaud Charlet) + * gtk/gtkradiobutton.c (gtk_radio_button_clicked): Emit notify::active here, when changing the value of this property. (#331651) diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 7916c88a18..9c3c3390c7 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -2663,8 +2663,7 @@ ensure_not_off_end (GtkTextBTree *tree, GtkTextLineSegment *mark, GtkTextIter *iter) { - if (gtk_text_iter_get_line (iter) == - _gtk_text_btree_line_count (tree)) + if (gtk_text_iter_get_line (iter) == _gtk_text_btree_line_count (tree)) gtk_text_iter_backward_char (iter); } @@ -3343,13 +3342,8 @@ ensure_end_iter_line (GtkTextBTree *tree) { if (tree->end_iter_line_stamp != tree->chars_changed_stamp) { - int n_lines; - int real_line; - - /* n_lines is without the magic line at the end */ - n_lines = _gtk_text_btree_line_count (tree); - - g_assert (n_lines >= 1); + /* n_lines is without the magic line at the end */ + g_assert (_gtk_text_btree_line_count (tree) >= 1); tree->end_iter_line = _gtk_text_btree_get_line_no_last (tree, -1, &real_line); diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index 31e3d6b84c..a757ad3c67 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -387,7 +387,7 @@ is_segment_start (GtkTextRealIter *real) return real->segment_byte_offset == 0 || real->segment_char_offset == 0; } -#if 1 +#ifdef G_ENABLE_DEBUG static void check_invariants (const GtkTextIter *iter) { -- 2.30.2